package Algorithms.chapter3.ch1;

public class demo {
    public static void main(String[] args) {
        BST tree=new BST();
        tree.put("E",1);
        tree.put("A",2);
        tree.put("S",3);
        tree.put("Y",4);
        tree.put("Q",5);
        tree.put("U",6);
        tree.put("E",7);//
        tree.put("S",8);//
        tree.put("T",9);
        tree.put("I",10);
        tree.put("O",11);
        tree.put("N",12);

        int s=tree. size();
        System.out.println("树的长度是："+s);
        tree.show();
        System.out.println("E的键值是："+tree.get("E"));
        System.out.println("最小键是："+tree.min());
        System.out.println("P的向下取整:"+tree.floor("P"));
        System.out.println("select 3:"+tree.select(3));
        System.out.println("rank s:"+tree.rank("S"));

        System.out.print("删除Q结果：");
        tree.delete("Q");
        tree.show();












    }
}
